Skip to content

Conversation

@mukunku
Copy link
Collaborator

@mukunku mukunku commented Dec 19, 2025

@changeset-bot
Copy link

changeset-bot bot commented Dec 19, 2025

🦋 Changeset detected

Latest commit: 0bc9779

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Dec 19, 2025

Deploy Preview for stacks-svelte ready!

Name Link
🔨 Latest commit 0bc9779
🔍 Latest deploy log https://app.netlify.com/projects/stacks-svelte/deploys/696135c62b366e00086a25e0
😎 Deploy Preview https://deploy-preview-2109--stacks-svelte.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 19, 2025

Deploy Preview for stacks ready!

Name Link
🔨 Latest commit 0bc9779
🔍 Latest deploy log https://app.netlify.com/projects/stacks/deploys/696135c5272e1a000779c62a
😎 Deploy Preview https://deploy-preview-2109--stacks.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines -167 to +154
// TODO: decouple .s-notice--btn from .s-btn
button&--dismiss {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introduced s-notice--dismiss class here to make the dismiss button more explicit and style it accordingly.

Comment on lines 56 to 70
/**
* Whether to include a dismiss button on the notice or not
*/
dismissable: boolean;
/**
* Optional dismiss event handler
*/
onDismiss?: MouseEventHandler<HTMLButtonElement>;
/**
* Dismiss button label override
*/
i18nDismissButtonLabel?: string;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the dismiss button a boolean flag here with additional props instead of a special NoticeAction case like it was before. I think this make more sense and improves usability. Hopefully other folks agree 🙏🏾

align-items: center;
gap: var(--su4);

&--icon {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introduced the s-notice--icon class for the icons

Comment on lines 26 to 27
<button type="button" class="s-link s-link__underlined">Undo</button>
<button type="button" class="s-link s-notice--dismiss js-toast-close" aria-label="Dismiss" data-action="s-toast#hide">{% icon "ClearSm" %}</button>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted to style the buttons with s-link but not sure if I should've used s-btn s-btn__link instead like we do in the Svelte component for Notices.

Copy link
Collaborator

@CGuindon CGuindon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great, just noticing some weirdness when I resize the screen smaller:

  • the whole browser starts to shrink instead of resize when I go below 600px width — feels like a docs issue but not sure if the toast is affecting this somehow
  • Notices can wrap to multiple lines when needed:
    • Padding right should maintain a minimum of 12px (even when there's no X or under button, the description text shouldn't touch the right edge of the notice)
    • Links on the end shouldn't wrap within itself (keep as single line unless the whole description is wrapping)
    • Code snipets shouldn't wrap within itself either
Screenshot 2025-12-19 at 9 59 44 AM

Added an extra example in the variations section to make that a bit clearer

Screenshot 2025-12-19 at 10 02 32 AM

For the toast not banner (possibly for the other ticket):

  • I noticed when I add the s-notice__important to the toast example, the undo link and close icon stay black instead of turning white as well.
Screenshot 2025-12-19 at 9 52 18 AM

@mukunku mukunku marked this pull request as ready for review December 19, 2025 18:10
@CGuindon
Copy link
Collaborator

I also had a note to myself to write a warning note to add to the docs right below the Toast description text. Can you use a warning in-page notice there that says:

Usage Warning: We are phasing out Toasts due to significant accessibility barriers. Avoid this component for new features. Instead, prioritize integrated alternatives—such as component state changes or inline messages—to provide accessible feedback directly where the user is focused.

Screenshot 2025-12-19 at 10 13 57 AM

@mukunku mukunku changed the title feat(notice): update styles for SHINE feat(notice/toast): update styles for SHINE Jan 7, 2026
@mukunku
Copy link
Collaborator Author

mukunku commented Jan 7, 2026

Thanks for the review @CGuindon ! I believe I addressed all your findings around responsiveness and multi-line content. Please take a look and let me know how it looks now.

I also decided to do Toasts as part of this PR because the changes left were so small. I additionally added the warning you mentioned:
{EF8D2E39-B3F5-4EA2-BD4B-A62E0492A649}

@mukunku mukunku requested a review from CGuindon January 7, 2026 19:21
Copy link
Collaborator

@CGuindon CGuindon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're using the old X icon, you can use the new cross for the dismiss icon button. Otherwise LGTM

Screenshot 2026-01-07 at 2 19 12 PM

@mukunku mukunku requested a review from CGuindon January 8, 2026 14:31
Copy link
Collaborator

@CGuindon CGuindon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OOOooooooooh even some fancy stacking and animations (not that we see this often) — looking good!

Screenshot 2026-01-09 at 10 43 43 AM

@mukunku
Copy link
Collaborator Author

mukunku commented Jan 9, 2026

OOOooooooooh even some fancy stacking and animations (not that we see this often) — looking good!

Screenshot 2026-01-09 at 10 43 43 AM

FWIW That was already there; I didn't add that feature 😅

Copy link
Contributor

@dancormier dancormier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking sharp 😎 I'd be happy to see this merged.

The only issue worth mentioning that I can see is with the margin-left on the button. In the Svelte Toast example for "With actions", I noticed the actions butting up against one another.
Image

This is the sort of thing I'd expect to be resolved with a gap applied. The issue with this is it will add another xpx to the 22px margin-left on the notice button. I'd make a suggestion but I didn't have time to dig into it and I don't think this needs to hold up merging this PR.

Thanks for the nice work here @mukunku

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants